home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_10_03 / 1003066b < prev    next >
Text File  |  1992-01-22  |  428b  |  17 lines

  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. main()
  4.      {
  5.      FILE *fp;
  6.      char far *hga_buff;
  7.      unsigned bytes_written;
  8.      hga_buff = (char far *) 0xB0000000L;
  9.      if ( fp = fopen("screen.pic", "wb") == NULL )  
  10.           {
  11.           puts("Error opening file.");
  12.           exit(1);
  13.           }
  14.      bytes_written = fwrite(hga_buff,1,32767,fp);
  15.      printf("%u bytes written to file.\n",bytes_written);
  16.    }
  17.